<?php
namespace app\admin\validate;

use think\Validate;

class LoginValidate extends Validate
{
    protected $rule = [
        'username'  =>  'require|min:3|max:25',
        'password' =>  'require|min:6|max:12',
    ];
    protected $message  =   [
        'username.require' => '用户名必须输入',
        'username.max'     => '用户名最多不能超过25个字符',
        'username.min'     => '用户名最少不能少于3个字符',
        'password.require' => '密码必须输入',
        'password.min'   => '密码最少不能少于6个字符',  
        'password.max'   => '密码最多不能超过12个字符',  
    ];

}